<h2>Recuperación de contraseña</h2>
<%@title_view = 'Usuarios'%>

<%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => {:onsubmit => "return validate(this);", :method => :put }) do |f| %>
  <%= devise_error_messages! %>

  <div class="shadow" style="width: 400px; padding-top: 15px; height: 215px;">
    <%= f.hidden_field :reset_password_token %>

    <p><%= f.label :password, "Nueva contraseña", :style => "margin-left: 30px" %>
      <%= f.password_field :password, :style => "margin-left: 30px" %></p>

    <p><%= f.label :password_confirmation, "Confirmar contraseña", :style => "margin-left: 30px" %>
      <%= f.password_field :password_confirmation, :style => "margin-left: 30px" %></p>

    <p><%= f.submit "Modificar", :style => "margin-left: 115px" %></p>
  </div>

  <script type="text/javascript">
    // form validation function //
    function validate(form) {
      //input
      var email = form.user_email.value;

      if(email == "") {
        inlineMsg('user_email','Debe ingresar su correo.',3);
        return false;
      }

    }
  </script>
<% end %>

